#ifndef PORTABLE_EXECUTE_H_
#define PORTABLE_EXECUTE_H_

#include "src/d8/d8.h"
#include "src/snapshot/code-serializer.h"

namespace portable {
void ReadBinaryFile(const char* file_name, std::vector<uint8_t>& buffer);
// bool ExecutePbc(v8::Isolate* isolate, v8::Local<v8::Context> realm,
//                 const std::vector<uint8_t>& buffer, bool log_pbc,
//                 bool lazy_transform_pbc);

v8::MaybeLocal<v8::UnboundScript> PortableTransformUnboundInternal(
    v8::Isolate* isolate, const uint8_t* data, int length, bool log_pbc,
    v8::ScriptCompiler::CompileOptions compile_options =
        v8::ScriptCompiler::CompileOptions::kNoCompileOptions,
    v8::ScriptCompiler::CachedData* cached_data = nullptr,
    std::string filename = "output.pbc");
}  // namespace portable

#endif